package hh.util.uuid;

import java.util.concurrent.atomic.AtomicLong;

public class SimpleMemoryId implements IdGenerator<Long> {
    private SimpleMemoryId() {
    }

    public static SimpleMemoryId instance = new SimpleMemoryId();

    public static Long id() {
        return instance.getId();
    }


    AtomicLong incr = new AtomicLong(0);

    @Override
    public Long getId() {
        return incr.incrementAndGet();
    }
}
